import React from 'react';
import { inject,observer } from 'mobx-react';
import * as mobx from 'mobx';
import { getAntd,getEcCom,getLabel } from '../../../util/convert';
import Content from '../../../asyncComps/freeFlowSet';
import * as type from '../../../constants/type';
import base from '../../../util/base';

@observer
export default class Main extends React.Component{
    render(){
        const { WeaDialog } = getEcCom();
        const { visible,openType='flowset' } = this.props;
        let dialogWidth = window.innerWidth * 0.9;
        let dialogHeight = window.innerHeight * 0.9;
        return (
            <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1uv73p`}
                visible={visible}
                loadCss={true}
                initLoadCss={true}
                title={'流转设定'}
                icon="icon-coms-workflow"
                iconBgcolor='#0079DE'
                maskClosable={false}
                onCancel={()=>{
                    base.globalStore.controlDialogVisible(type.FREE_FLOW_SET, false)
                }}
                style={{width:dialogWidth, height:dialogHeight}}
                maxHeight={10000}
            >
                <Content ecId={`${this && this.props && this.props.ecId || ''}_Content@zlr4b7`} {...this.props} />
            </WeaDialog>
        )
    }

    dialogClose =() =>{
        base.globalStore.controlDialogVisible(type.FREE_FLOW_SET, false);
    }
}